import type { App } from "vue";
import { useDict } from "@/utils/dict";
import { download } from "@/utils/request";
import {
  parseTime,
  resetForm,
  addDateRange,
  handleTree,
  selectDictLabel,
  selectDictLabels
} from "@/utils/ruoyi";

const globalProperties = {
  install(app: App): void {
    // 全局方法挂载
    app.config.globalProperties.useDict = useDict;
    app.config.globalProperties.download = download;
    app.config.globalProperties.parseTime = parseTime;
    app.config.globalProperties.resetForm = resetForm;
    app.config.globalProperties.addDateRange = addDateRange;
    app.config.globalProperties.handleTree = handleTree;
    app.config.globalProperties.selectDictLabel = selectDictLabel;
    app.config.globalProperties.selectDictLabels = selectDictLabels;
  }
};
export default globalProperties;
